﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TrainingWorkshop.DAL_EF.Translator
{
    public class TeacherTranslator
    {
        public static List<TrainingWorkshop.Models.Teacher> TransfertoModelTeacher(List<TrainingWorkshop.DAL_EF.Teacher> teacher)
        {
            List<TrainingWorkshop.Models.Teacher> teacherList = new List<Models.Teacher>();
            foreach (Teacher teacherEntity in teacher)
            {
                TrainingWorkshop.Models.Teacher teacherModel = new Models.Teacher();
                teacherModel.TeacherId = teacherEntity.TeacherId;
                teacherModel.TeacherName = teacherEntity.TeacherName;
                teacherModel.TeacherGender = teacherEntity.TeacherGender;
                teacherModel.DepartmentId = teacherEntity.DepartmentId;
                teacherList.Add(teacherModel);
            }
            return teacherList;
        }
        public static List<Teacher> TransfertoModelTeacher(List<TrainingWorkshop.Models.Teacher> teacher)
        {
            List<Teacher> teacherList = new List<Teacher>();
            foreach (Models.Teacher  teacherModel in teacher)
            {
                Teacher teacherEntity = new Teacher();
                teacherEntity.TeacherId = teacherModel.TeacherId;
                teacherEntity.TeacherName = teacherModel.TeacherName;
                teacherEntity.TeacherGender = teacherModel.TeacherGender;
                teacherEntity.DepartmentId = teacherModel.DepartmentId;
                teacherList.Add(teacherEntity);
            }
            return teacherList;
        }
    }
}
